<?
//upload 03/24;

include_once '/var/www/html/new/com.inc.php';
$ac=$GLOBALS['_ac'];
$pw=$GLOBALS['_pw'];
$s = new SoapClient(null,array("location" => "http://localhost/open/openService/pft_insideMX.php","uri" => "www.16u.com?ac_16u=$ac|pw_16u=$pw|auth_16u=true"));
$aid=$_SESSION['sid'];
$btime=date('Y-m-d',strtotime("-30days"));
$etime=date('Y-m-d');
$bt= $btime .' 00:00:00';
$et = $etime .' 23:59:59';
$lid_arr=array();
$x_ob1 = simplexml_load_string($s -> Order_Globle_Search(
    "","$aid", "", "", "", "", "", "", "", "",
    "$bt", "$et", "", "", "", "1", "", "", "1", "1",
    "0", "1000", "0", "0","","0","0", "0","","",
    "", "", "", "", ""));
//print_r($x_ob1);
// echo "<br/>";
foreach($x_ob1->Rec as $key1=>$val1)
{if($val1->UUpmode==3)
    $lid_arr[(string)$val1->UUlid]=$val1->UUltitle;

}
//print_r($lid_arr);
//echo "<br/>";
$x_ob2 = simplexml_load_string($s -> Order_Globle_Search(
    "","", "", "", "", "", "", "", "", "",
    "$bt", "$et", "", "", "", "1", "", "", "1", "1",
    "0", "1000", "0", "0","","0","0", "0","","",
    "$aid", "", "", "", ""));
//print_r($x_ob2);
foreach($x_ob2->Rec as $key2=>$val2)
{
    $lid_arr[ (string)$val2->UUlid ]=$val2->UUltitle;

}
//print_r($lid_arr);
// echo "<br/>";
$lid_arr=array_unique($lid_arr);
//print_r($lid_arr);
// print_r($lid_arr);
// foreach($lid_arr as $v)
//{
//print_r($v);
//$x_obt = $s -> Order_Globle_Search(
//"","", "", "$v", "", "", "", "", "", "",
//"$st", "$ed", "", "", "", "", "", "", "1", "1",
//"0", "", "2", "0","","0","0", "0","","",
//"$aid", "", "", "", "");
//print_r($x_obt);
//$ticket_arr=explode(',',$x_obt);
//$ticket_arr[$v]=(int)$ticket_arr[1];
//}
//print_r($ticket_arr);


?>
<link rel="stylesheet" type="text/css" href="http://www.12301.cc/css/select2.css">
<style type="text/css">
    #saleReprotMod{ width:600px;}
    #ctrlContainer{ margin-bottom:5px;}
    #ctrlContainer label{ position:relative; top:1px; font-size:12px; cursor:pointer}
    #ctrlContainer input.dateTrigger{ position:relative; top:3px; cursor:pointer; margin-right:1px; margin-left:15px;}
    #echartContainer{ height:400px; border:1px solid #e1e1e1; border-radius:3px; padding:8px; background:rgb(247,247,247)}
    #echartContainerCon{ height:100%; width:100%;}
    #s2id_jqSelect{ width:359px;}
    /*.select2-container{ display:block; margin-bottom:10px;}*/
    .select2-container .select2-choice{ broder-radius:2px; border-color:#e1e1e1}
    #startTimeInp{ width:217px; height:32px; padding:0 5px; padding-left:8px; margin-bottom:5px; border:1px solid #e1e1e1; border-radius:2px; background:url(http://www.12301.cc/images/dateIcon.png) no-repeat 99%}
    .select2-container .select2-choice{ height:32px; line-height:32px;}
    .select2-container .select2-choice .select2-arrow{ width:30px;}
    #saleReprotMod .btnW{ margin-top:10px; text-align:right}
    #saleReprotMod .tp{ margin-top:10px; padding-bottom:8px; margin-bottom:6px; border-bottom:1px solid #E1E1E1}
    #saleReprotMod .tp .txt{ height:16px; line-height:16px; padding:0; margin:0; padding-left:3px; border-left:3px solid #3E3E3E; font-size:14px; color:#3E3E3E; font-weight:bold}
    #saleReprotMod .tp .icon{ display:inline-block; width:10px; height:10px; margin-right:3px; background:#008EC1;}
    /* 日历插件样式 */
    #calendarPanel{ width:231px; height:208px; padding:5px 0px; background:url(http://www.12301.cc/images/calendarPannelWrap.gif) no-repeat 0 0}
    #calendarPanel .calTopW{ width:100%; position:relative; height:28px;}
    #calendarPanel .selectW{ overflow:hidden; margin:0 30px; text-align:center;}
    #calendarPanel .calTopW input{ position:absolute; top:3px; display:block; width:22px; height:19px; cursor:pointer; font-size:0; border:0 none; background:none;}
    #calendarPanel #prevMonth{ left:10px;}
    #calendarPanel #nextMonth{ right:9px;}
    #calendarPanel .selectW select{ height:24px; line-height:24px; width:77px;}
    #calendarYear{ margin-right:5px;}
    #calendarTable thead{ height:28px;}
    #calendarTable thead th{ text-align:center; font-weight:bold;}
    #calendarTable tbody{ }
    #calendarTable tbody td{ height:23px; border-right:1px solid #ececec;border-bottom:1px solid #ececec}
    #saleReprotMod .endTimetip{ display:none; font-size:12px; color:#9c9c9c}
    #saleReprotMod .echartBtn{ display:inline-block; height:32px; line-height:32px; padding:0 30px; font-size:12px; color:#fff; border-radius:3px; cursor:pointer; broder:1px solid #fff; margin-right:10px;}
    #saleReprotMod .echartBtn.query{ margin-left:20px; background:#d87329; border-color:#a95416}
    #saleReprotMod .echartBtn.query:hover{ background:#eb7d2c;}
    #saleReprotMod .echartBtn.refresh{ background:#50b350; border-color:#2d852d}
    #saleReprotMod .echartBtn.refresh:hover{ background:#60c760; border-color:#4cae4c}
    .btnW{display:none;}
</style>
<div id="saleReprotMod" class="saleReprotMod">
    <div class="tp"><p class="txt">销量统计报表</p></div>
    <div id="ctrlContainer" class="ctrlContainer">
        <!--<input type="text" name="btime3" id="startTimeInp" class="startTimeInp" onmouseup="SelectDate(this,'yyyy-MM-dd',0,0)" value="2015-03-03">-->
        <select name="lid" id="jqSelect" tabindex="-1" title="">
            <?
            if($lid_arr){
                foreach($lid_arr as $lid=>$v){
                    ?>
                    <option value="<?=$lid?>"><?=$v?></option>
                <?}}else{?>
                <option value="">请选择景区</option>
            <?}?>
        </select>
        <input id="threeDayTrigger" checked="checked" class="dateTrigger threeDayTrigger" type="radio" name="dateTrigger" value="<?=date('Y-m-d',strtotime('-3days'))?>"/><label for="threeDayTrigger">3天内</label>
        <input id="weekTrigger" class="dateTrigger weekTrigger" type="radio" name="dateTrigger" value="<?=date('Y-m-d',strtotime('-7days'))?>"/><label for="weekTrigger">1周内</label>
        <input id="monthTrigger" class="dateTrigger monthTrigger" type="radio" name="dateTrigger" value="<?=date('Y-m-d',strtotime('-30days'))?>"/><label for="monthTrigger">1个月内</label>
        <!--<span class="endTimetip">结束时间默认至今天</span>-->
    </div>
    <div id="echartContainer" class="echartContainer"><div id="echartContainerCon" class="echartContainerCon"></div></div>
    <div class="btnW">
        <span id="queryChartBtn" class="echartBtn query">查询</span>
        <span style="margin-right:0" id="refreshChartBtn" class="echartBtn refresh">刷新</span>
    </div>
</div>
<script type="text/javascript" src="http://www.12301.cc/js/echarts-2.2.0/build/dist/echarts-all.js"></script>
<script type="text/javascript" src="http://www.12301.cc/js/global/www.12301.cc.global.js"></script>
<script type="text/javascript" src="http://www.12301.cc/js/zy_Calendar.js"></script>
<script type="text/javascript" src="http://www.12301.cc/js/select2.js"></script>
<script type="text/javascript" src="http://www.12301.cc/module/wcb/echarts/sale_reports.js"></script>